home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / recent / mcf4amrc.lha / MCF4AmIRC / Rexx / MCF_MDO.AMIRX < prev    next >
Text File  |  1996-09-17  |  2KB  |  14 lines

  1. /* MCF_MDO.AMIRX
  2. // $VER: MCF_MDO.AMIRX 4.1 (29.07.96)
  3. \\ Written by Donald T. Becker (dtbecker@prolog.net) IRC: StarDustr
  4. // Please mail any bug reports/comments to the above address with a subject
  5. \\ header of MCF.AMIRX.
  6. //
  7. \\ ** What to do with this file?
  8. // Put this script in REXX:  It will be used by MCF.AMIRX.
  9. \\
  10. //  What else to do with this file.
  11. \\  Type   /Rx MCF_MDO    in the channel you wish to perform a Mass De-OP.
  12. //  or add Alias:  MDO /Rx MCF_MDO
  13. */
  14. ;arg MCFenv MyNick Unick CurCh junk Rnick junk;OPTIONS RESULTS;if MCFenv ~="" then;address value(MCFenv);else MCFenv=address();xl=pos(".",MCFenv)+1;Client=substr(McFenv,xl);OCC="OPCHAR."||Client;OPChar=getclip(value(OCC));if MyNick="" then signal Master;CName=CurCh||"."||Client;ChUs=getclip(value(CName));signal DoIt;Master:;getchannel;CurCh=result;getmynick;MyNick=upper(result);RNick=MyNick;getusers;ChUs=upper(result)||" ";Unick=MyNick;DoIt:;userhost Unick;IPAddr=upper(result);atpos=pos("@",IPAddr)+1;IPAddr=substr(IPAddr,atpos);userhost MyNick;MyIP=upper(result);atpos=pos("@",MyIP)+1;MyIP=substr(MyIP,atpos);lcnt=1;dcnt=0;dline.1="";do cntr=1 by 1 until ChUs="";parse value ChUs with user ChUs;if 0 ~=pos(MyNick,user) then iterate;if 0=pos(OPChar,user) then iterate;tuser=substr(user,2);if Unick=tuser then iterate;user=substr(user,2);userhost user;HisIP=upper(result);atpos=pos("@",HisIP)+1;HisIP=substr(HisIP,atpos);if HisIP=MyIP then;if MyIP ~=IPAddr then iterate;dcnt= dcnt+1;dline.lcnt= dline.lcnt user;if dcnt=4 then;do;dcnt=0;lcnt=lcnt+1;dline.lcnt="";end;end cntr;if dline.1="" then exit;do cnt=1 by 1 until cnt=lcnt;"say /deop "CurCh dline.cnt;end cnt;exit